Skip to content

Gate uniform message padding behind --dev-uniform-padding#8997

Open
sangbida wants to merge 4 commits intoElementsProject:masterfrom
sangbida:sangbida/gate-padded-pings-v2
Open

Gate uniform message padding behind --dev-uniform-padding#8997
sangbida wants to merge 4 commits intoElementsProject:masterfrom
sangbida:sangbida/gate-padded-pings-v2

Conversation

@sangbida
Copy link
Copy Markdown
Collaborator

@sangbida sangbida commented Mar 27, 2026

CLN 26.04rc1 introduced uniform message padding, which pads outgoing pings to prevent traffic analysis. Per BOLT #1, a num_pong_bytes >= 65532 means the recipient must not reply with a pong — it is a valid no-reply ping. However, LND does not comply with this part of the spec (they have very recently fixed this though) so to maintain interoperability between lightning implementations this feature is being gated behind an experimental flag for now.

Fixes #8978

Checklist

Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:

  • The changelog has been updated in the relevant commit(s) according to the guidelines.
  • Tests have been added or modified to reflect the changes.
  • Documentation has been reviewed and updated as needed.
  • Related issues have been listed and linked, including any that this PR closes.
  • Important All PRs must consider how to reverse any persistent changes for tools/lightning-downgrade

Copy link
Copy Markdown
Collaborator

@Lagrang3 Lagrang3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, this solves the issue #8978

@sangbida sangbida force-pushed the sangbida/gate-padded-pings-v2 branch 2 times, most recently from 118263d to d12c74f Compare March 28, 2026 21:27
@sangbida sangbida enabled auto-merge (rebase) March 28, 2026 21:27
@sangbida sangbida added 26.04 bug bug identified in the 26.04 CLN release. 26.04 RC This PR needs to go into the next release candidate for 26.04 and removed 26.04 bug bug identified in the 26.04 CLN release. labels Mar 28, 2026
This boolean allows lightningd and connectd to be on the same page on whether the uniform padding experimental flag is enabled.
Uniform padding (sending all messages as 1460-byte chunks) breaks
peers running LND-based nodes: LND disconnects on receiving a
ping(num_pong_bytes=65535) with "pong bytes exceeded" instead of
ignoring it as required by BOLT ElementsProject#1.
Gate the feature behind --dev-uniform-padding so it is opt-in rather
than forced on all connections. Nodes that only peer with CLN can
enable it for the traffic analysis defence.
Changelog-Changed: uniform message padding is now opt-in via the --dev-uniform-padding flag.
@sangbida sangbida force-pushed the sangbida/gate-padded-pings-v2 branch from d12c74f to 81bad5b Compare March 30, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

26.04 RC This PR needs to go into the next release candidate for 26.04

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Peers disconnect after upgrading to v26.04rc1

2 participants